package com.grass.p019lv.game.adapter;

import android.graphics.Color;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.TextView;
import androidx.recyclerview.widget.RecyclerView;
import com.androidsa.bttsddka.R;
import com.androidx.p013lv.base.recycler.BaseRecyclerAdapter;
import com.androidx.p013lv.base.recycler.BaseRecyclerHolder;
import com.androidx.p013lv.base.utils.TimeUtils;
import com.androidx.p013lv.base.utils.ToastUtils;
import com.androidx.p013lv.base.utils.UiUtils;
import com.grass.p019lv.game.bean.GameWithDrawDetailbean;

/* renamed from: com.grass.lv.game.adapter.GameWithDrawInfoAdapter */
public class GameWithDrawInfoAdapter extends BaseRecyclerAdapter<GameWithDrawDetailbean.GameWithDrawDetailData, Holder> {
    public void MyHolder(Holder holder, int i) {
        holder.setData((GameWithDrawDetailbean.GameWithDrawDetailData) this.list.get(i), i);
    }

    public void onViewRecycled(Holder holder) {
        super.onViewRecycled((RecyclerView.ViewHolder) holder);
    }

    @Override // androidx.recyclerview.widget.RecyclerView.Adapter
    public Holder onCreateViewHolder(ViewGroup viewGroup, int i) {
        return new Holder(LayoutInflater.from(viewGroup.getContext()).inflate(R.layout.item_game_withdraw_info, viewGroup, false));
    }

    /* access modifiers changed from: package-private */
    /* renamed from: com.grass.lv.game.adapter.GameWithDrawInfoAdapter$Holder */
    public class Holder extends BaseRecyclerHolder {
        ImageView iv_status;
        TextView tv_copy;
        TextView tv_money;
        TextView tv_order_num;
        TextView tv_pay_time;
        TextView tv_pay_type;
        TextView tv_status;

        public Holder(View view) {
            super(view);
            this.tv_order_num = (TextView) view.findViewById(R.id.tv_order_num);
            this.tv_pay_time = (TextView) view.findViewById(R.id.tv_pay_time);
            this.tv_pay_type = (TextView) view.findViewById(R.id.tv_pay_type);
            this.tv_money = (TextView) view.findViewById(R.id.tv_money);
            this.tv_copy = (TextView) view.findViewById(R.id.tv_copy);
            this.iv_status = (ImageView) view.findViewById(R.id.iv_status);
            this.tv_status = (TextView) view.findViewById(R.id.tv_status);
        }

        public void setData(final GameWithDrawDetailbean.GameWithDrawDetailData gameWithDrawDetailData, int i) {
            TextView textView = this.tv_order_num;
            textView.setText("订单编号：" + gameWithDrawDetailData.getTradeNo());
            TextView textView2 = this.tv_pay_time;
            textView2.setText("交易时间：" + TimeUtils.utcToChina(gameWithDrawDetailData.getUpdatedAt()));
            if (1 == gameWithDrawDetailData.getPayType()) {
                this.tv_pay_type.setText("支付方式：支付宝");
            } else {
                this.tv_pay_type.setText("支付方式：银联");
            }
            TextView textView3 = this.tv_money;
            textView3.setText("金额：" + gameWithDrawDetailData.getMoney());
            int status = gameWithDrawDetailData.getStatus();
            if (status == 1) {
                this.tv_status.setText("提现中");
                this.tv_status.setTextColor(-1);
                this.iv_status.setImageResource(R.drawable.ic_recharge_pending);
            } else if (status == 2) {
                this.tv_status.setText("提现成功");
                this.tv_status.setTextColor(Color.parseColor("#FC5BD1"));
                this.iv_status.setImageResource(R.drawable.ic_recharge_success);
            } else if (status == 3) {
                this.tv_status.setText("提现失败");
                this.tv_status.setTextColor(Color.parseColor("#666666"));
                this.iv_status.setImageResource(R.drawable.ic_recharge_no);
            }
            this.tv_copy.setOnClickListener(new View.OnClickListener() {
                /* class com.grass.p019lv.game.adapter.GameWithDrawInfoAdapter.Holder.View$OnClickListenerC30421 */

                public void onClick(View view) {
                    if (!UiUtils.copyContentClipboard(gameWithDrawDetailData.getTradeNo())) {
                        ToastUtils.getInstance().showWrong("复制失败");
                    } else {
                        ToastUtils.getInstance().showCorrect("复制成功");
                    }
                }
            });
        }
    }
}
